package com.nti56.springboot.mapper.tmsmapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;

import com.nti56.springboot.mapper.BaseMapper;
import com.nti56.springboot.model.Role;

@Mapper
public interface RoleMapper extends BaseMapper<Role>{
	
	public List<Role> getRoleList(Map map);
	
	/**
	 * 根据roleId删除用户角色中间表
	 * @param roleId
	 */
	public void deleteUserRoleByRoleId(String roleId);
	
	/**
	 * 根据roleId删除 角色资源中间表
	 * @param roleId
	 */
	public void deleteResourceRoleByRoleId(String roleId);
	
	/**
	 * 根据userId删除,和角色类型  用户角色中间表
	 * @param userId
	 */
	public void deleteUserRoleByUserId(Map map);
	
	/**
	 * 
	 * @param userId
	 * @return
	 */
	public List<Role> getRoleListByUserId(Map map);
}
